using System;
using System.Collections.Generic;

namespace ZeBobo5.LibraryHelper.Orm
{
    public abstract class OrmFieldBase<A>
        where A : IOrmDataElementBase
    {
        protected readonly Dictionary<IOrmDataElementBase, OrmValuesBase> _ormValues = new Dictionary<IOrmDataElementBase, OrmValuesBase>();

        private string _strFieldName;

        public string FieldName
        {
            get
            {
                return _strFieldName;
            }
            protected set
            {
                _strFieldName = value;
            }
        }

        internal OrmValuesBase GetValues(OrmDataElementBase<A> el)
        {
            return _ormValues[el];
        }

        public abstract Type ValuesType();

        public override string ToString()
        {
            return FieldName;
        }
    }
}